package http.four4xx;

import http.MyHttpResponse;
import util.MyDateUtil;

import java.io.IOException;

/**
 * @author Karl
 * @Date 2023/1/11 - 19:08
 */
public class AuthenticationRequired extends MyHttpResponse {
    public AuthenticationRequired() {
        int len = 0;
        responseLine = "HTTP/1.1 407 Authentication Required\r\n";
        addResponseHeader("Date","Date: "+ MyDateUtil.getNowGMTTime()+lineSeparator);
        addResponseHeader("Proxy-Authenticate","Proxy-Authenticate: Basic realm=\"Access to internal site\""+lineSeparator);
    }
}
